$(document).ready(function() {
    $('#fullpage').fullpage({
        navigation: true,
        loopBottom: true,
        scrollingSpeed: 1000,
        // 当前页出现时，先显示包裹元素的div，再为元素添加动画类
        afterLoad: (anchorLink, index) => {
            if (index.index === 0) {
                $('.section1 .section_item').css('display', 'flex')
                $('.section1 .card').eq(0).addClass('animated bounceInDown')
                $('.section1 .card').eq(1).addClass('animated bounceInUp')
                $('.section1 .card').eq(2).addClass('animated bounceInDown')
                $('.section1 .card').eq(0).css({'animation-duration': '2s'})
                $('.section1 .card').eq(1).css({'animation-duration': '2s', 'animation-delay': '1s'})
                $('.section1 .card').eq(2).css({'animation-duration': '2s', 'animation-delay': '2s'})
            } else if (index.index == 1) {
                $('.section2 .section_item').css('display', 'flex')
                $('.section2 .card').eq(0).addClass('animated bounceInLeft')
                $('.section2 .card').eq(1).addClass('animated bounceInRight')
            } else if (index.index == 2) {
                $('.section3 .section_item').css('display', 'flex')
                $('.section3 .card').eq(0).addClass('animated backInLeft')
                $('.section3 .card').eq(1).addClass('animated backInRight')
                $('.section3 .card').eq(2).addClass('animated backInUp')
            }
        }
        // 
    })
})